library
{base}
Load an R package
droplevels
{base}
Drop Unused Levels from Factors
lm
{base}
Fit a linear model
as.character
{base}
Coerce a vector to character
t.test
{stats}
Performs one and two sample t-tests on vectors of data.
aes
{GGPLOT2}
Construct aesthetic mapping of a ggplot graph
chisq.test
{stats}
Chi-Squared test (e.g. for cross-tabulations)
table
{base}
Obtain frequency table of a variable/cross-tabulation of two variables
with
{base}
evaluate expression in the context of a data frame
recode
{dplyr}
Recode a variable
leveneTest
{car}
Computes Levene’s test for homogeneity of variance across groups.
ordered
{dplyr}
Create an ordered factor
stargazer
{stargazer}
Create a regression output table
names
{base}
Retrieve names of a list/vector
is.element
{base}
Check if a value is element of a vector
theme_classic
{GGPLOT2}
A minimalistic theme with no gridlines
relevel
{stats}
Reorder Levels of Factor
confint
{stats}
Calculate confidence Intervals for Model Parameters
attach
{base}
Attach Set of R Objects to Search Path
ls
{base}
Return a vector of character strings giving the names of the objects in the specified environment
prop.test
{stats}
Test of Equal or Given Proportions
read.csv
{utils}
Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters
prop.table
{base}
Transform frequency table into table of proportions
levels
{base}
Get levels of a factor
cut
{base}
Convert Numeric to Factor
ggplot
{GGPLOT2}
Create a ggplot graph
geom_point
{GGPLOT2}
Generates a scatter plot
xlab
{GGPLOT2}
Label the x axis (ggplot)
setwd
{base}
Set Working Directory
scale_y_continuous
{GGPLOT2}
Customise continuous y axis
ifelse
{base}
Return a or b depending on the value of test
read_excel
{readxl}
Read an Excel file
scale_x_continuous
{GGPLOT2}
Customise continuous x axis
summary
{base}
Obtain summary statistics or detailed regression output
c
{base}
Combine values/vectors into a vector
subset
{base}
Return subsets of vectors, matrices or data frames which meet conditions.
as.numeric
{base}
Coerce a vector to numeric
rm
{base}
Remove objects
log
{base}
log (default base = e)
read_dta
{haven}
Read a .dta file (Stata data)
ylab
{GGPLOT2}
Label the y axis (ggplot)
geom_smooth
{GGPLOT2}
Generates a smoothed conditional means curve / line
mutate
{dplyr}
Modify/create a column in a data frame
The end!